//
//  UIColor+Create.h
//  GuChat
//
//  Created by iBenz on 15/6/1.
//  Copyright (c) 2015年 Guzhi Tech. All rights reserved.
//

#import <UIKit/UIKit.h>

typedef UIColor* (^HexBlock)(unsigned long long hexValue);
typedef UIColor* (^HexAlphaBlock)(unsigned long long hexValue, CGFloat alpha);

@interface UIColor(Create)

/**
 *  通过HEX字符串生成UIColor
 *
 *  @param hexValue hex颜色字符串，兼容@"0xrrggbb[aa]",@"#rrggbb[aa]"和@"rrggbb[aa]"
 *  @param alpha    透明值[0~1]
 */

+ (UIColor *)colorWithHexString:(NSString *)hexValue;
+ (UIColor *)colorWithHexString:(NSString *)hexValue alpha:(CGFloat)alpha;
+ (UIColor *)colorWithHexValue:(unsigned long long)value;
+ (UIColor *)colorWithHexValue:(unsigned long long)rgbValue alpha:(CGFloat)alpha;

+ (HexBlock)hexColor;
+ (HexAlphaBlock)hexAlphaColor;

@end

UIColor *HexColor(unsigned long long hexValue);
UIColor *HexAlphaColor(unsigned long long hexValue, CGFloat alpha);
